package com.gxgeek.javabasic.collection.set;

import java.util.HashSet;
import java.util.Iterator;

/**
 * Created by GX on 2017/9/1.
 */
public class AnalyzeHashSet {
    public static void main(String[] args) {



        HashSet set = new HashSet();



        for (int i = 0 , length  = 1000;i<length;i++){
            set.add(i);
        }

        //        System.out.println(spliterators.getComparator());
        Iterator iterator = set.iterator();
        while (iterator.hasNext()){
            System.out.println(iterator.next());
        }

        System.out.println(set.toString());



    }
}
